package com.example.serverSide.commom.util;

import org.springframework.stereotype.Component;

@Component
public class CacheUtil {
   /* @Autowired
    private RedisTemplate<String,Object> template;

    public Object get(String key){
        return key == null ? null : template.opsForValue().get(key);
    }

    public boolean hasKey(String key) {
        try {
            return template.hasKey(key);
        }catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }

    public void delete(String ... keys) {
        if (keys != null && keys.length>0) {
            if (keys.length == 1) {
                template.delete(keys[0]);
                return;
            }
            template.delete(Arrays.asList(keys));
        }
    }

    public boolean set(String key, Object value) {
        try {
            template.opsForValue().set(key, value);
            return true;
        }catch (Exception e) {
            e.printStackTrace();
            return false;
        }

    }*/
}
